-
Notifications
You must be signed in to change notification settings - Fork 10
hotspot: fix intrinsic String.indexOf #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: jdk17u-target8
Are you sure you want to change the base?
Conversation
bd83315
to
c97803b
Compare
#endif | ||
break; | ||
case Op_StrEquals: | ||
// We already know that cnt1 == cnt2 here (checked in 'inline_string_equals'). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- caller 里是不是也要改一下?
LibraryCallKit::inline_string_equals
- 这里每一个分支都有个
#if
, 直接拆成两个 switch 是不是可读性更高些
#if
switch (...) {
....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- caller 里是不是也要改一下?
LibraryCallKit::inline_string_equals
- 这里每一个分支都有个
#if
, 直接拆成两个 switch 是不是可读性更高些#if switch (...) { ....
Fixed, 考虑到函数开头还有assert,把整个函数都提取成了两个版本。感觉需要等到这里的修复提交后再跑下测试再合入
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对了,能加个测试验证下这个改动吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对了,能加个测试验证下这个改动吗?
加了String.contains
的测试,inline_string_equals
加了unreachable
c97803b
to
8d66fe6
Compare
b42ea4b
to
387f20a
Compare
|
||
virtual bool depends_only_on_test() const { return false; } | ||
virtual const TypePtr* adr_type() const { return TypeAryPtr::BYTES; } | ||
virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if TARGET_CLASSLIB == 8
virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }
#else
virtual const TypePtr* adr_type() const { return TypeAryPtr::BYTES; }
#endif
387f20a
to
5b2016e
Compare
No description provided.